import * as TYPES from "./mutation-types.js"

const mutations = {
  [TYPES.SET_CURRENTUSER](state, user) {
    state.currentUser = user
  },
  [TYPES.SET_LOGIN](state, isLogin) {
    state.isLogin = isLogin
  },
  [TYPES.SET_CITY](state, cityId) {
    state.cityId = cityId
  },
  [TYPES.SET_CITYNAME](state, cityName) {
    state.cityName = cityName
  },
  [TYPES.SET_RESETFLAG](state, resetFlag) {
    state.resetFlag = resetFlag
  },
  [TYPES.SET_SIDESHOW](state, showBool) {
    state.feedBackShow = showBool
  },
  [TYPES.SET_SUPPLYFLAG](state, needSupplyInfo) {
    state.needSupplyInfo = needSupplyInfo
  },
  [TYPES.SET_NEEDPAY](state, needPay) {
    state.needPayBool = needPay
  },
  [TYPES.SET_DIALOGCLOSE](state, dialogClose) {
    state.dialogClose = dialogClose
  },
  [TYPES.SET_TRADERECORD](state, tradeRecord) {
    state.tradeRecord = tradeRecord
  },
  [TYPES.SET_FIRSTPAYBOOL](state, firstPayBool) {
    state.firstPayBool = firstPayBool
  },
  [TYPES.SET_SERVICE_PHONE](state, phone) {
    state.servicePhone = phone
  },
  [TYPES.SET_QQNUM](state, qq) {
    state.QQNum = qq
  },
  [TYPES.SET_RESULT_COURSE](state, result) {
    state.resultCourse = result
  },
  [TYPES.SET_SHOW_EMAIL_BTN_BOOL](state, showEmailBtnBool) {
    state.showEmailBtnBool = showEmailBtnBool
  },
  setCityList(state, cityData) {
    state.cityList = cityData.cityList
    state.cityListAll = cityData.cityListAll
  },
  [TYPES.SET_FREE_TIME](state, freeTime) {
    state.freeTime = freeTime
  },
  [TYPES.SET_UNREAD_NUMBER](state, unreadNumber) {
    state.unreadNumber = unreadNumber
  },
  [TYPES.SET_UNREADLS_NUMBER](state, unreadlsNumber) {
    state.unreadlsNumber = unreadlsNumber
  }
}

export default mutations
